package com.hmall.model;

import lombok.Data;

import java.util.Date;
import javax.persistence.*;

@Data
@Table(name = "sys_user")
public class SysUser {
    /**
     * 用户表id
     */
    @Id
    @Column(name = "user_id")
    private Integer userId;

    /**
     * 用户名
     */
    private String username;

    /**
     * 用户密码，MD5加密
     */
    private String password;

    private String email;

    private String phone;

    /**
     * 随机盐
     */
    private String salt;

    /**
     * 简介
     */
    private String introduction;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 部门ID
     */
    @Column(name = "dept_id")
    private Integer deptId;

    /**
     * 找回密码问题
     */
    private String question;

    /**
     * 找回密码答案
     */
    private String answer;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 最后一次更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 0-正常，1-删除
     */
    @Column(name = "del_flag")
    private String delFlag;

    private String province;

    private String city;

    private String area;

    private String address;

    private Integer status;

    /**
     * 经销商id
     */
    @Column(name = "dealer_id")
    private Integer dealerId;

    @Column(name = "real_name")
    private String realName;
}